<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>欢迎页面</title>
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<!--    <link rel="stylesheet" href="../css/element-ui.css" />-->
    <script src="../js/vue.js"></script>
    <script src="../js/element-ui.js"></script>
</head>
<body>
<div id="app">
    <el-container>
        <el-header>
            <div style="text-align: right">
                <el-dropdown split-button type="primary" @click="handleClick">
                    更多
                    <el-dropdown-menu slot="dropdown">
                        <el-dropdown-item>个人中心</el-dropdown-item>
                        <el-dropdown-item>退出登入</el-dropdown-item>
                    </el-dropdown-menu>
                </el-dropdown>
            </div>
        </el-header>

        <el-container>
            <el-aside width="200px">
                <div style="width: 100%; height: 80px; line-height: 50px;">
                    <h3>{{title}}</h3>
                </div>
                <div>
                    <el-radio-group v-model="isCollapse" style="margin-bottom: 20px;">
                        <el-radio-button :label="false">展开</el-radio-button>
                        <el-radio-button :label="true">收起</el-radio-button>
                    </el-radio-group>

                    <el-menu default-active="1-4-1" class="el-menu-vertical-demo" @open="handleOpen"
                             @close="handleClose" :collapse="isCollapse">

                        <el-submenu index="1">
                            <template slot="title">
                                <i class="el-icon-location"></i>
                                <span slot="title" style="font-weight: 600">🐌</span>
                            </template>
                            <el-menu-item-group>
                                <el-menu-item index="1-1">
                                    <a href="demo1.html" target="main">音乐大全</a>
                                </el-menu-item>
                                <el-menu-item index="1-2">
                                    <a href="demo2.html" target="main">我的收藏</a>
                                </el-menu-item>
                                <el-menu-item index="1-3">
                                    <a href="/" target="main">新增音乐</a>
                                </el-menu-item>
                            </el-menu-item-group>
                        </el-submenu>

                        <el-menu-item index="2">
                            <template slot="title">
                                <span>🐉</span>
                            </template>
                            <i class="el-icon-menu"></i>
                        </el-menu-item>

                        <el-menu-item index="3">
                            <i class="el-icon-setting"></i>
                            <span slot="title">🐏</span>
                        </el-menu-item>
                    </el-menu>
                </div>
            </el-aside>

            <!--右侧内容显示页面-->
            <el-main>
                <iframe src="../鲜花页面.html" name="main" frameborder="0" width="100%" height="100%">111</iframe>
            </el-main>
        </el-container>
    </el-container>
</div>
</body>
<script>
    let vm = new Vue({
        el: '#app',
        data() {
            return {
                isCollapse: true,
                asideWidth: '200px',
                title: '蜗牛管理系统'
            }
        },
        methods: {
            handleOpen(key, keyPath) {
                console.log(key, keyPath);
            },
            handleClose(key, keyPath) {
                console.log(key, keyPath);
            },
            handleClick() {
                alert("button click")
            }
        }
    });
</script>
<style>
    .el-header, .el-footer {
        background-color: #B3C0D1;
        color: #333;
        text-align: center;
        line-height: 60px;
    }

    .el-aside {
        background-color: #D3DCE6;
        color: #333;
        text-align: center;
        height: 90vh; /* wh表示按照比例划分 */
    }

    .el-main {
        background-color: #E9EEF3;
        color: #333;
        text-align: center;
        line-height: 160px;
    }

    * {
        margin: 0px;
        padding: 0px;
        text-decoration: none; /* 去除下划线 */
    }

    body > .el-container {
        margin-bottom: 40px;
    }

    .el-container:nth-child(5) .el-aside,
    .el-container:nth-child(6) .el-aside {
        line-height: 260px;
    }

    .el-container:nth-child(7) .el-aside {
        line-height: 320px;
    }

    li {
        list-style: none;
    }

    .el-menu-vertical-demo:not(.el-menu--collapse) {
        width: 200px;
        min-height: 400px;
    }

    el-dropdown {
        vertical-align: top;
    }

    el-dropdown + .el-dropdown {
        margin-left: 15px;
    }

    .el-icon-arrow-down {
        font-size: 12px;
    }
</style>
</html>
